package com.reremouse.rerebbs.web.mb.mag;

import com.reremouse.model.AdvModel;
import com.reremouse.rerebbs.dao.IAdvDAO;
import com.reremouse.util.SpringHelper;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.component.html.HtmlDataTable;
import java.io.Serializable;
import java.util.List;

@ManagedBean
@ViewScoped
public class ListAdv
        implements Serializable {
    List<AdvModel> advList;
    IAdvDAO advDAO = (IAdvDAO) SpringHelper.getSpringBean("AdvDAO");
    HtmlDataTable dataTable = new HtmlDataTable();

    public List<AdvModel> getAdvList() {
        return this.advList;
    }

    public void setAdvList(List<AdvModel> advList) {
        this.advList = advList;
    }

    public HtmlDataTable getDataTable() {
        return this.dataTable;
    }

    public void setDataTable(HtmlDataTable dataTable) {
        this.dataTable = dataTable;
    }

    public ListAdv() {
        synchronizeDB();
    }

    private void synchronizeDB() {
        this.advList = this.advDAO.findAllAdv();
    }
}



/* Location:           F:\jsp源码\蝙蝠论坛系统\rerebbs\WEB-INF\classes\

 * Qualified Name:     com.reremouse.rerebbs.web.mb.mag.ListAdv

 * JD-Core Version:    0.7.0.1

 */